package cn.wzptsoft.mall.mapper;

import cn.wzptsoft.mall.pojo.Order;
import cn.wzptsoft.mall.pojo.test.Jsontest;
import cn.wzptsoft.mall.pojo.vo.OrderInfoVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {


    @Select("select id,order_no,total_amount,total_count, snap_address as address,status,'' AS item  " +
            "from `order`  " +
            "where user_id=${id}")
    Page<OrderInfoVO> getInfo(@Param("page")Page<Order> page,Integer id);

    @Select("select * from tinymall.js")
    Jsontest json ();

}
